<style scoped>
.layout {
  height: 100%;
}

.layout-content {
  height: 100%;
  width: 100%;
  background: white;
  /* background-size: 100% 100%; */
}

.content-box {
  height: calc(100% - 60px);
  width: 100%;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  position: relative;
  overflow: hidden;
}

.content-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}
</style>
<template>
  <div class="layout">
    <div class="layout-content">
      <header-box></header-box>
      <div class="width-percent-100 content-box flex-par">
        <el-menu class="contentLeft" :default-active="$store.state.activePath" :router="true">
          <!-- <template v-for="item in menuList">
            <el-sub-menu v-if="item.children && item.children.length > 0" :index="item.id">
              <template #title>{{ item.menuName }}</template>
<el-menu-item class="active-style" v-for="child in item.children" :index="child.menuUrl">{{ child.menuName
  }}</el-menu-item>
</el-sub-menu>
<el-menu-item v-else class="active-style" :index="item.menuUrl">
  <span>{{ item.menuName }}</span>
</el-menu-item>
</template> -->
          <el-menu-item class="active-style" index="/manageList">
            <span>商品管理</span>
          </el-menu-item>
          <!--  
          <el-sub-menu class="active-style">
            <template #title>系统管理</template>
          </el-sub-menu> -->
        </el-menu>
        <router-view style="width:calc(100% - 220px)"></router-view>
      </div>
    </div>
  </div>
</template>
<script>
// import // boundEmpSys,
// '@/assets/api/api.js';

import headerBox from '@/components/headerBox';


import { getMyUserInfo } from '@/assets/api/api.js';
export default {
  data: function () {
    return {
      menuList: []
    };
  },
  components: {
    headerBox,
  },
  mounted() {
    //    this.getMyUserInfo()
  },
  methods: {
    // toHome() {
    //   this.$router.push({ path: '/' });
    // },
    // handleClose(e) {
    //   //console.log(e);
    // },
    // gotoMap() {
    //   // window.location.href = 'index.html'
    //   window.location.href = `http://${window.location.hostname}`;
    // },
    getMyUserInfo() {
      getMyUserInfo()
        .then((res) => {
          console.log(res)
          if (res.code == 0) {
            this.menuList = res.data.menuList
            localStorage.setItem('myUserType', res.data.userType)
          }
        })
        .catch((err) => { });
    },
  },
};
</script>